package com.unknowpupil.design.template;

/**
 * @Description: <p>
 *
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/28 15:39
 * @Classname: Client
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        BankTemplateMethod btm = new DrawMoney();
        btm.process();
        BankTemplateMethod bt2 = new BankTemplateMethod() {
            @Override
            public void transact() {
                System.out.println("我要存钱");
            }
        };
        bt2.process();
    }
}

class DrawMoney extends BankTemplateMethod{

    @Override
    public void transact() {
        System.out.println("我取款");
    }
}